//=============================================================================
#ifndef _CAPP_H_
    #define _CAPP_H_

#include <SDL.h>
#include <unistd.h>

#include "CClients.h"
#include "CEvent.h"
#include "CLua.h"

#include "Stringify.h"
#include "CNetwork.h"

#include <net2.h>
#include <fastevents.h>

//=============================================================================
class CApp : public CEvent {
    public:
        static CApp* Instance;

    public:
        bool Running;

    public:
        CApp();

        void OnEvent(SDL_Event* Event);

            void OnUser(Uint8 type, int code, void* data1, void* data2);

        int OnExecute();

        bool OnInit();

        void OnLoop();

        static void OnCleanup();

        static BOOL WINAPI ConsoleHandler(DWORD CEvent);
};

//=============================================================================

#endif
